﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.Modeling.CUiSetEndModelingSimulationView
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Interop;
using System.Windows.Markup;
using Tecnomatix.Engineering.Ui.WPF;


namespace DnProcessSimulateCommands.Modeling;

public class CUiSetEndModelingSimulationView : TxWindow, IComponentConnector
{
  private const int GWL_STYLE = -16;
  private const int WS_SYSMENU = 524288 /*0x080000*/;
  internal CUiSetEndModelingSimulationView MainWindow;
  private bool _contentLoaded;

  [DllImport("user32.dll", SetLastError = true)]
  private static extern int GetWindowLong(IntPtr hWnd, int nIndex);

  [DllImport("user32.dll")]
  private static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);

  public CUiSetEndModelingSimulationView() => this.InitializeComponent();

  protected virtual void OnSourceInitialized(EventArgs e)
  {
    IntPtr handle = new WindowInteropHelper((Window) this).Handle;
    CUiSetEndModelingSimulationView.SetWindowLong(handle, -16, CUiSetEndModelingSimulationView.GetWindowLong(handle, -16) & -524289);
    base.OnSourceInitialized(e);
  }

  [DebuggerNonUserCode]
  [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
  public void InitializeComponent()
  {
    if (this._contentLoaded)
      return;
    this._contentLoaded = true;
    Application.LoadComponent((object) this, new Uri("/DnProcessSimulateCommands;component/modeling/cuisetendmodelingsimulationview.xaml", UriKind.Relative));
  }

  [DebuggerNonUserCode]
  [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
  [EditorBrowsable(EditorBrowsableState.Never)]
  void IComponentConnector.Connect(int connectionId, object target)
  {
    if (connectionId == 1)
      this.MainWindow = (CUiSetEndModelingSimulationView) target;
    else
      this._contentLoaded = true;
  }
}
